<br /><br />

<?php  
$themes= $this->themes; ?>
<?php if($themes==null):?>
<p> Nothing Found!</p>

<?php else :?>
<table  border="1">
<tr><td colspan=6>Total of themes:<span class="total"> <?php echo $this->total; ?></span></td></tr>
<tr><th>Id</th><th>Title</th><th>Num_items</th><th>Description</th><th>Images</th></tr>
<?php 
	foreach ($themes as $theme):
?>
	<tr><td><?php echo $theme["id"]; ?></td><td><?php echo $theme["title"]; ?></td><td><?php echo $theme["num_items"];?></td>
	<td><div ><?php echo $theme["description"]; ?></div>
	</td>
	<td valign="middle" align="center"><div class="images"><?php if(key_exists("multimedia_Data", $theme)):?>
	<?php foreach($theme["multimedia_Data"] as $media):?>
		<?php if(in_array($media["mime_format"], array("jpeg","png"))): ?>
		<img alt="" src="<?php echo $media["images"]["thumbnail"]["url"];?>" />
		<?php endif;?>
	<?php endforeach;?>
	<?php endif;?></div>
	</td>
	<?php if ($theme["num_items"]>0):?>
	<td><form action="/ItemManager/getitems" method="post">
			<input type="hidden"  name="path" value="<?php echo $theme["items_uri"]?>" />
			<input type="submit" value="View this Theme" />
	
	</form></td>
	<?php endif;?></tr>

<?php 
endforeach;?>
</table>
<?php endif;?>